package com.zretc.support.tool;

import org.springframework.stereotype.Component;

@Component
public class AjaxResponse {
	private String msg;//响应返回的数据:消息 
	private int code;//返回的一个代码 1 0 100 200 状态的判断
	private Object obj;//
	private boolean flag;//状态判断
	//private List<Object> list;//响应的数据等
	
	
	/**
	 * @return the obj
	 */
	public Object getObj() {
		return obj;
	}
	
	

	public AjaxResponse(String msg, boolean flag) {
		super();
		this.msg = msg;
		this.flag = flag;
	}



	/**
	 * @return the flag
	 */
	public boolean isFlag() {
		return flag;
	}



	/**
	 * @param flag the flag to set
	 */
	public void setFlag(boolean flag) {
		this.flag = flag;
	}



	/**
	 * @param obj the obj to set
	 */
	public void setObj(Object obj) {
		this.obj = obj;
	}

	public AjaxResponse() {
		// TODO Auto-generated constructor stub
	}
	
	public AjaxResponse(String msg, int code) {
		super();
		this.msg = msg;
		this.code = code;
	}

	public AjaxResponse(Object obj) {
		this.obj = obj;
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return msg;
	}
	/**
	 * @param msg the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
	}
	/**
	 * @return the code
	 */
	public int getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(int code) {
		this.code = code;
	}

}
